package com.newsproject.pojo;

import Util.FormatTime;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

//新闻审核表的实体类
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class AuditPost {
    private int auditId;  //待审核内容id
    private int postId;    //新闻id
    private int adminId;   //审核人(即管理员)id
    private String adminName;  //审核人(即管理员)姓名
    private String tagName;      //新闻标签名称
    private int tagId;           //新闻标签id
    private String targetType;       //新闻标签类型
    private String auditResult;    //审核结果
    private String auditReason;  //审核意见
    private Date auditTime;

    public AuditPost(int postId,int adminId,String adminName,String tagName,int tagId,String auditResult,String auditReason) {
        this.postId = postId;
        this.adminId = adminId;
        this.adminName = adminName;
        this.tagName = tagName;
        this.tagId = tagId;
        this.auditResult = auditResult;
        this.auditReason = auditReason;

        this.targetType="news";
        this.auditTime=new Date();
    }
    public String getAuditTime() {
        return FormatTime.formatDateTime(this.auditTime);
    }

}
